package com.mask.im.server;

import com.mask.im.server.service.ServiceIdManager;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;

import java.util.TimeZone;

/**
 * @author jian
 */

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class MaskImServerApp {

    public static void main(String[] args) {
        SpringApplication.run(MaskImServerApp.class, args);
        TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
    }

    @Bean
    public CommandLineRunner commandLineRunner(ServiceIdManager serviceIdManager) {
        return args -> {
            System.err.println("serviceIdManager.getNodeId():" + serviceIdManager.getNodeId());
        };
    }

}
